// 扩展成就和剧情的翻译数据

class ExtendedTranslations {
    constructor() {
        this.setupTranslations();
    }

    setupTranslations() {
        const zhTranslations = {
            // 扩展章节标题
            chapter2_title: '第二章：多维度的回响',
            chapter3_title: '第三章：无限的可能性', 
            chapter4_title: '第四章：命运的十字路口',
            chapter5_title: '第五章：时空回音的传承',

            // 新增选择选项
            choice1_4: '凭直觉用手触摸设备',
            choice1_5: '尝试与设备"对话"',

            // 扩展成就翻译
            achievement_brave_explorer: '勇敢的探索者',
            achievement_brave_explorer_desc: '选择探索未知的道路',
            achievement_dimension_hopper: '维度跳跃者',
            achievement_dimension_hopper_desc: '在不同维度间旅行',
            achievement_multiverse_tourist: '多元宇宙观光客',
            achievement_multiverse_tourist_desc: '访问5个不同的平行世界',
            achievement_quantum_master: '量子大师',
            achievement_quantum_master_desc: '完全理解量子现象',
            achievement_data_analyst: '数据分析师',
            achievement_data_analyst_desc: '仔细分析所有科学数据',
            achievement_theory_crafter: '理论工匠',
            achievement_theory_crafter_desc: '提出革命性的科学理论',
            achievement_safety_officer: '安全官员',
            achievement_safety_officer_desc: '始终将安全放在第一位',
            achievement_world_protector: '世界守护者',
            achievement_world_protector_desc: '保护世界免受威胁',
            achievement_team_player: '团队合作者',
            achievement_team_player_desc: '与他人协作解决问题',
            achievement_diplomat: '外交家',
            achievement_diplomat_desc: '通过对话解决冲突',
            achievement_ending_collector_5: '结局收集者',
            achievement_ending_collector_5_desc: '解锁5个不同的结局',
            achievement_ending_collector_10: '结局探索者',
            achievement_ending_collector_10_desc: '解锁10个不同的结局',
            achievement_all_endings_master: '结局终极大师',
            achievement_all_endings_master_desc: '解锁所有20个结局',
            achievement_first_contact: '第一次接触',
            achievement_first_contact_desc: '与异次元存在建立联系',
            achievement_ai_whisperer: 'AI低语者',
            achievement_ai_whisperer_desc: '与人工智能建立深层沟通',
            achievement_reality_bender: '现实弯曲者',
            achievement_reality_bender_desc: '学会操控现实本身',
            achievement_empathetic_soul: '共情之魂',
            achievement_empathetic_soul_desc: '理解他人的情感',
            achievement_compassionate_heart: '慈悲之心',
            achievement_compassionate_heart_desc: '展现无私的同情心',
            achievement_wise_choice: '明智选择',
            achievement_wise_choice_desc: '做出深思熟虑的决定',
            achievement_philosopher: '哲学家',
            achievement_philosopher_desc: '深入思考存在的意义',
            achievement_cosmic_consciousness: '宇宙意识',
            achievement_cosmic_consciousness_desc: '与宇宙意识融为一体',
            achievement_brave_heart: '勇敢之心',
            achievement_brave_heart_desc: '面对恐惧时仍然前进',
            achievement_fearless_explorer: '无畏探索者',
            achievement_fearless_explorer_desc: '勇敢面对未知危险',
            achievement_speedrun_master: '速通大师',
            achievement_speedrun_master_desc: '在15分钟内完成游戏',
            achievement_no_regrets: '无悔人生',
            achievement_no_regrets_desc: '不使用回溯功能完成游戏',
            achievement_easter_egg_hunter: '彩蛋猎人',
            achievement_easter_egg_hunter_desc: '发现游戏中隐藏的彩蛋',
            achievement_secret_keeper: '秘密守护者',
            achievement_secret_keeper_desc: '解锁所有隐藏秘密',
            achievement_void_walker: '虚空行者',
            achievement_void_walker_desc: '在虚无中行走',
            achievement_dream_weaver: '梦境编织者',
            achievement_dream_weaver_desc: '编织现实与梦境',
            achievement_transcendence: '超越者',
            achievement_transcendence_desc: '超越一切限制',
            achievement_true_ending_master: '真结局大师',
            achievement_true_ending_master_desc: '发现游戏的真正结局',
            achievement_echo_eternal: '永恒回音',
            achievement_echo_eternal_desc: '成为时空中永恒的回音',

            // 20个结局标题和描述
            ending_scientific_hero: '科学之光',
            ending_scientific_hero_desc: '你的发现改变了人类对宇宙的理解，成为新时代的科学先驱。',
            ending_explorer_pioneer: '多元宇宙探索者',
            ending_explorer_pioneer_desc: '你成为第一个多元宇宙旅行者，为人类开辟无限新边疆。',
            ending_guardian_eternal: '永恒守护者',
            ending_guardian_eternal_desc: '你接受守护多元宇宙的重任，成为时空平衡的维护者。',
            ending_unity_bringer: '统一者',
            ending_unity_bringer_desc: '你成功统一多个平行世界，创建前所未有的多元文明联邦。',
            ending_quantum_observer: '量子观察者',
            ending_quantum_observer_desc: '你发现意识与量子现象的深层联系，成为新物理学奠基人。',
            ending_time_theorist: '时间理论家',
            ending_time_theorist_desc: '你提出全新时间理论，解释时空回音现象的本质。',
            ending_reality_architect: '现实架构师',
            ending_reality_architect_desc: '你学会编程现实本身，成为能设计创造新宇宙的存在。',
            ending_fusion_being: '融合存在',
            ending_fusion_being_desc: '你与量子场融为一体，获得超越人类的能力和责任。',
            ending_cosmic_consciousness: '宇宙意识',
            ending_cosmic_consciousness_desc: '你的意识扩展到整个宇宙，成为连接所有生命的桥梁。',
            ending_dimension_walker: '维度行者',
            ending_dimension_walker_desc: '你获得在不同维度间自由穿行的能力。',
            ending_safety_first: '安全守护者',
            ending_safety_first_desc: '虽然错过个人冒险机会，但你确保了所有人的安全。',
            ending_world_protector: '世界保护者',
            ending_world_protector_desc: '你选择保护原本的世界，阻止可能的多元宇宙灾难。',
            ending_accidental_traveler: '意外旅行者',
            ending_accidental_traveler_desc: '你被意外传送到平行世界，开始异世界的全新人生。',
            ending_paradox_creator: '悖论制造者',
            ending_paradox_creator_desc: '你的行为创造时间悖论，导致现实变得不稳定和充满可能性。',
            ending_interdimensional_love: '跨维度之恋',
            ending_interdimensional_love_desc: '你与来自另一维度的存在坠入爱河，开始跨越宇宙的浪漫故事。',
            ending_ai_companion: '人工智能伴侣',
            ending_ai_companion_desc: '你与觉醒的人工智能建立深厚感情联系，共同探索意识奥秘。',
            ending_multiverse_conqueror: '多元宇宙征服者',
            ending_multiverse_conqueror_desc: '你利用时空设备力量征服多个平行世界，成为跨维度统治者。',
            ending_reality_destroyer: '现实毁灭者',
            ending_reality_destroyer_desc: '你选择毁灭所有不完美的现实，只保留你认为理想的世界。',
            ending_enlightened_one: '觉悟者',
            ending_enlightened_one_desc: '你超越所有选择和可能性，达到真正觉悟，成为指引他人的智者。',
            ending_eternal_student: '永恒学者',
            ending_eternal_student_desc: '你选择永远学习探索，在无限知识海洋中寻找真理。'
        };

        const enTranslations = {
            // 对应的英文翻译
            chapter2_title: 'Chapter 2: Echoes Across Dimensions',
            chapter3_title: 'Chapter 3: Infinite Possibilities',
            chapter4_title: 'Chapter 4: Crossroads of Destiny',
            chapter5_title: 'Chapter 5: Legacy of Time Echo',

            choice1_4: 'Instinctively touch the device with your hand',
            choice1_5: 'Try to "communicate" with the device',

            achievement_brave_explorer: 'Brave Explorer',
            achievement_brave_explorer_desc: 'Choose to explore unknown paths',
            achievement_dimension_hopper: 'Dimension Hopper',
            achievement_dimension_hopper_desc: 'Travel between different dimensions',
            achievement_multiverse_tourist: 'Multiverse Tourist',
            achievement_multiverse_tourist_desc: 'Visit 5 different parallel worlds',
            achievement_quantum_master: 'Quantum Master',
            achievement_quantum_master_desc: 'Completely understand quantum phenomena',
            achievement_data_analyst: 'Data Analyst',
            achievement_data_analyst_desc: 'Carefully analyze all scientific data',
            achievement_theory_crafter: 'Theory Crafter',
            achievement_theory_crafter_desc: 'Propose revolutionary scientific theories',
            achievement_safety_officer: 'Safety Officer',
            achievement_safety_officer_desc: 'Always put safety first',
            achievement_world_protector: 'World Protector',
            achievement_world_protector_desc: 'Protect the world from threats',
            achievement_team_player: 'Team Player',
            achievement_team_player_desc: 'Collaborate with others to solve problems',
            achievement_diplomat: 'Diplomat',
            achievement_diplomat_desc: 'Resolve conflicts through dialogue',
            achievement_ending_collector_5: 'Ending Collector',
            achievement_ending_collector_5_desc: 'Unlock 5 different endings',
            achievement_ending_collector_10: 'Ending Explorer',
            achievement_ending_collector_10_desc: 'Unlock 10 different endings',
            achievement_all_endings_master: 'Ultimate Ending Master',
            achievement_all_endings_master_desc: 'Unlock all 20 endings',
            achievement_first_contact: 'First Contact',
            achievement_first_contact_desc: 'Establish connection with interdimensional beings',
            achievement_ai_whisperer: 'AI Whisperer',
            achievement_ai_whisperer_desc: 'Establish deep communication with AI',
            achievement_reality_bender: 'Reality Bender',
            achievement_reality_bender_desc: 'Learn to manipulate reality itself',
            achievement_empathetic_soul: 'Empathetic Soul',
            achievement_empathetic_soul_desc: 'Understand others\' emotions',
            achievement_compassionate_heart: 'Compassionate Heart',
            achievement_compassionate_heart_desc: 'Show selfless compassion',
            achievement_wise_choice: 'Wise Choice',
            achievement_wise_choice_desc: 'Make thoughtful decisions',
            achievement_philosopher: 'Philosopher',
            achievement_philosopher_desc: 'Think deeply about existence',
            achievement_cosmic_consciousness: 'Cosmic Consciousness',
            achievement_cosmic_consciousness_desc: 'Merge with universal consciousness',
            achievement_brave_heart: 'Brave Heart',
            achievement_brave_heart_desc: 'Continue forward despite fear',
            achievement_fearless_explorer: 'Fearless Explorer',
            achievement_fearless_explorer_desc: 'Bravely face unknown dangers',
            achievement_speedrun_master: 'Speedrun Master',
            achievement_speedrun_master_desc: 'Complete game in 15 minutes',
            achievement_no_regrets: 'No Regrets',
            achievement_no_regrets_desc: 'Complete game without using rewind',
            achievement_easter_egg_hunter: 'Easter Egg Hunter',
            achievement_easter_egg_hunter_desc: 'Find hidden easter eggs in game',
            achievement_secret_keeper: 'Secret Keeper',
            achievement_secret_keeper_desc: 'Unlock all hidden secrets',
            achievement_void_walker: 'Void Walker',
            achievement_void_walker_desc: 'Walk in the void',
            achievement_dream_weaver: 'Dream Weaver',
            achievement_dream_weaver_desc: 'Weave reality and dreams',
            achievement_transcendence: 'Transcendence',
            achievement_transcendence_desc: 'Transcend all limitations',
            achievement_true_ending_master: 'True Ending Master',
            achievement_true_ending_master_desc: 'Discover the game\'s true ending',
            achievement_echo_eternal: 'Eternal Echo',
            achievement_echo_eternal_desc: 'Become an eternal echo in spacetime',

            // 20个结局英文翻译
            ending_scientific_hero: 'Light of Science',
            ending_scientific_hero_desc: 'Your discoveries changed humanity\'s understanding of the universe, becoming a pioneer of the new age.',
            ending_explorer_pioneer: 'Multiverse Explorer',
            ending_explorer_pioneer_desc: 'You became the first multiverse traveler, opening infinite new frontiers for humanity.',
            ending_guardian_eternal: 'Eternal Guardian',
            ending_guardian_eternal_desc: 'You accepted the responsibility of guarding the multiverse, becoming a maintainer of spacetime balance.',
            ending_unity_bringer: 'Unity Bringer',
            ending_unity_bringer_desc: 'You successfully unified multiple parallel worlds, creating an unprecedented multiversal civilization federation.',
            ending_quantum_observer: 'Quantum Observer',
            ending_quantum_observer_desc: 'You discovered the deep connection between consciousness and quantum phenomena, becoming a founder of new physics.',
            ending_time_theorist: 'Time Theorist',
            ending_time_theorist_desc: 'You proposed new theories of time, explaining the nature of spacetime echo phenomena.',
            ending_reality_architect: 'Reality Architect',
            ending_reality_architect_desc: 'You learned to program reality itself, becoming an existence capable of designing and creating new universes.',
            ending_fusion_being: 'Fusion Being',
            ending_fusion_being_desc: 'You merged with the quantum field, gaining abilities and responsibilities beyond human.',
            ending_cosmic_consciousness: 'Cosmic Consciousness',
            ending_cosmic_consciousness_desc: 'Your consciousness expanded to the entire universe, becoming a bridge connecting all life.',
            ending_dimension_walker: 'Dimension Walker',
            ending_dimension_walker_desc: 'You gained the ability to freely travel between different dimensions.',
            ending_safety_first: 'Safety Guardian',
            ending_safety_first_desc: 'Though you missed personal adventure opportunities, you ensured everyone\'s safety.',
            ending_world_protector: 'World Protector',
            ending_world_protector_desc: 'You chose to protect the original world, preventing possible multiversal disasters.',
            ending_accidental_traveler: 'Accidental Traveler',
            ending_accidental_traveler_desc: 'You were accidentally transported to a parallel world, starting a new life in another world.',
            ending_paradox_creator: 'Paradox Creator',
            ending_paradox_creator_desc: 'Your actions created time paradoxes, making reality unstable and full of possibilities.',
            ending_interdimensional_love: 'Interdimensional Love',
            ending_interdimensional_love_desc: 'You fell in love with a being from another dimension, starting a romantic story across the universe.',
            ending_ai_companion: 'AI Companion',
            ending_ai_companion_desc: 'You established deep emotional connections with awakened AI, exploring the mysteries of consciousness together.',
            ending_multiverse_conqueror: 'Multiverse Conqueror',
            ending_multiverse_conqueror_desc: 'You used the power of spacetime devices to conquer multiple parallel worlds, becoming a cross-dimensional ruler.',
            ending_reality_destroyer: 'Reality Destroyer',
            ending_reality_destroyer_desc: 'You chose to destroy all imperfect realities, keeping only the world you consider ideal.',
            ending_enlightened_one: 'Enlightened One',
            ending_enlightened_one_desc: 'You transcended all choices and possibilities, achieving true enlightenment and becoming a guide for others.',
            ending_eternal_student: 'Eternal Student',
            ending_eternal_student_desc: 'You chose to learn and explore forever, seeking truth in the infinite ocean of knowledge.'
        };

        // 添加翻译到i18n系统
        if (window.i18n) {
            window.i18n.addTranslations('zh', zhTranslations);
            window.i18n.addTranslations('en', enTranslations);
            console.log('✓ 扩展翻译已加载');
        } else {
            // 延迟加载
            setTimeout(() => {
                if (window.i18n) {
                    window.i18n.addTranslations('zh', zhTranslations);
                    window.i18n.addTranslations('en', enTranslations);
                    console.log('✓ 扩展翻译已延迟加载');
                }
            }, 1000);
        }
    }
}

// 创建全局扩展翻译实例
window.extendedTranslations = new ExtendedTranslations();